package com.roocon.design_pattern.chapter08_active_object;

public class ActiveTaskFactory {
  private ActiveTaskFactory(){}

  public static ActiveTask createActiveTask(){
    Worker worker = new Worker();
    WorkTaskQueue queue = new WorkTaskQueue();
    WorkingPlan plan = new WorkingPlan(queue);
    ActiveTaskProxy proxy = new ActiveTaskProxy(plan, worker);
    plan.start();
    return proxy;
  }
}
